# utils/math_problems.py
import random


def generate_math_problems(level):
    problems = []
    if level == 1:
        # 10以内加减法口算
        for _ in range(50):
            a = random.randint(0, 10)
            b = random.randint(0, 10)
            problems.append(f"{a} + {b} = ")
    elif level == 2:
        # 20以内加减法口算
        for _ in range(50):
            a = random.randint(0, 20)
            b = random.randint(0, 20)
            problems.append(f"{a} + {b} = ")
    # 其他题型同理，添加elif判断和对应的题目生成逻辑
    return problems
